@extends('admin.layout')
@section('body')
    <!-- 正文开始 -->
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">
                <table id="adminTable" lay-filter="adminTable"></table>
            </div>
        </div>
    </div>
@stop
@push('script')
    <script type="text/javascript">
        layui.use(['layer', 'form', 'table', 'util', 'admin'], function () {
            //加载完成
            var listTableInc = new ListTable("{{admin_url($baseRoute.'pager')}}");
            @auth('permission')
            listTableInc.actionBar('<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" title="@lang('system.role.permission')">@lang('system.role.permission')</button>', (tb, d) => {
                SystemUtil.openUrl2({
                    title: SystemUtil.__("@lang('common.permission_page')", {name: d.name}),
                    content: "{{admin_url($baseRoute.'permission_view')}}/" + d.id
                });
            });
            @endauth
            listTableInc.lineNumber();
            listTableInc.column("@lang('common.id')", "id").setWidth(100);
            listTableInc.column("@lang('system.group.name')", "name");
            listTableInc.column("标识", "code");
            listTableInc.column("描述", "desc");
            listTableInc.rowBarWidth = 85;
            listTableInc.render();
        });
    </script>
@endpush
